package com.cc.gulimall.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * 1.开启网关的注册与发现
 */
@EnableDiscoveryClient
/**
 * 2.因为项目依赖了gulimall-common，而其中引入了Mybaits的依赖，这使得程序启动时会默认寻找数据库的配置文件
 * 而gulimall-gateway只是作为网关，与数据库无关，这时可以用到exclude = {DataSourceAutoConfiguration.class}忽略掉数据源的启动项
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class GulimallGatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallGatewayApplication.class, args);
    }

}
